//
//  XMPP.h
//  cocoa-jabber-messenger
//
//  Created by Sangeun Kim on 4/16/11.
//  Copyright 2011 NHN Corporation. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol XMPPConnectionDelegate;
@protocol XMPPRosterDelegate;
@class XMPPThread;
@class XMPPSession;
@class XMPPSessionManager;
@interface XMPP : NSObject {
@private
    NSMutableArray* connectionDelegates;
    NSMutableArray* stanzas;
    id < XMPPRosterDelegate > rosterDelegate;
    XMPPThread* thread;
    
    IBOutlet XMPPSessionManager* sessionManager;
}

@property (assign) id < XMPPRosterDelegate > rosterDelegate;
- (XMPPSessionManager*) sessionManager;
- (BOOL)loginWithId:(NSString*)loginId withPassword:(NSString*)password;
- (void) disconnect;
- (void) registerConnectionDelegate:(id < XMPPConnectionDelegate >) connectionDelegate;
- (void) deregisterConnectionDelegate:(id < XMPPConnectionDelegate >) connectionDelegate;
- (BOOL) isFinished;
- (void) startChat:(NSString*)jid;
- (void) close:(XMPPSession*) session;
@end
